/**
 * 
 */
package org.mips.Sirius.components;

import java.util.ArrayList;

import com.google.android.maps.GeoPoint;

/**
 * @author mips Represents a vehicle (bus, train, tram, subway train, etc)
 */
public class Vehicle {

	private String name;
	private GeoPoint coordinates;
	private double bearing;
	private String lineReference;
	private String originName;
	private String destinationName;
	private ArrayList<String> viaNames;
	private TimeMonitoring times;

	public TimeMonitoring getTimes() {
		return times;
	}

	public String getOriginName() {
		return originName;
	}

	public void setOriginName(String originName) {
		this.originName = originName;
	}

	public String getDestinationName() {
		return destinationName;
	}

	public void setDestinationName(String destinationName) {
		this.destinationName = destinationName;
	}

	public String getLineReference() {
		return lineReference;
	}

	public double getBearing() {
		return bearing;
	}

	public void setBearing(double bearing) {
		this.bearing = bearing;
	}

	public GeoPoint getCoordinates() {
		return coordinates;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public ArrayList<String> getViaNames() {
		return viaNames;
	}

	public void setViaNames(ArrayList<String> viaNames) {
		this.viaNames = viaNames;
	}

	public void setTimes(TimeMonitoring times) {
		this.times = times;
	}

	public void setLineReference(String lineReference) {
		this.lineReference = lineReference;
	}

	@Override
	public String toString() {
		return name + "(" + lineReference + ")" + "["
				+ coordinates.getLatitudeE6() + ','
				+ coordinates.getLongitudeE6() + ':' + bearing + ']' + "from "
				+ originName + " to " + destinationName + " via " + viaNames
				+ " with times: " + times;
	}

	/*
	 * Constructors
	 */
	public Vehicle(String lineRef, String name, int latitude, int longitude,
			double bearing) {
		this.lineReference = lineRef;
		this.name = name;
		this.coordinates = new GeoPoint(latitude, longitude);
		this.bearing = bearing;
	}

	public Vehicle(String lineReference, String name) {
		this(lineReference, name, 0, 0, 0);
	}

	public Vehicle(String lineReference, TimeMonitoring times,
			ArrayList<String> viaNames) {
		this(lineReference, "noname");
		this.times = times;
		this.viaNames = viaNames;
	}
}